<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>添加学生信息</title>

    <style>
        /* 重置一些默认样式 */
        body,
        h2,
        div {
            margin: 0;
            padding: 0;
        }

        /* 设置页面的基础样式 */
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f7f6;
            color: #333;
            padding: 20px;
        }

        h2 {
            text-align: center;
            margin-bottom: 30px;
            color: #2c3e50;
        }

        /* 创建一个居中的表单容器 */
        .form-container {
            max-width: 500px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        /* 表单标签的样式 */
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #333;
        }

        /* 输入框的样式 */
        input[type="text"],
        input[type="number"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 16px;
        }

        input[type="text"]:focus,
        input[type="number"]:focus {
            border-color: #3498db;
            outline: none;
        }

        /* 提交按钮的样式 */
        button[type="submit"] {
            width: 100%;
            padding: 12px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        button[type="submit"]:hover {
            background-color: #2980b9;
        }
    </style>

</head>

<body>
    @{
        var message = ViewBag.Message as string;
    }
    <h2>添加学生信息</h2>

    <div class="form-container">
        @using (Html.BeginForm("Add", "Manager", FormMethod.Post))
        {
            <div>
                <label for="StuNum">学号:</label>
                <input type="text" id="StuNum" name="StuNum" required />
            </div>
            <div>
                <label for="StuName">姓名:</label>
                <input type="text" id="StuName" name="StuName" required />
            </div>
            <div>
                <label for="StuAge">年龄:</label>
                <input type="number" id="StuAge" name="StuAge" required />
            </div>
            <div>
                <button type="submit">添加</button>
            </div>
            <div id="message">@message</div>
        }
    </div>
</body>

</html>
